package com.hospital.doctor.controller;

import com.hospital.doctor.service.BinLiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@CrossOrigin
@RequestMapping("/bingli")
public class BinLiController {

    @Autowired
    private BinLiService binLiService;

    @RequestMapping("/selectAll/{pId}")
    public Map<String,Object> selectAll(@PathVariable("pId") int pId){
        Map<String,Object> map = new HashMap<>();
        map.put("msg",binLiService.selectAll(pId));
        return map;
    }


}
